package apIExercise.io.io2;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class OSWDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos=new FileOutputStream("tt.txt");
        OutputStreamWriter osw=new OutputStreamWriter(fos, StandardCharsets.UTF_8);
        osw.write("我就是太阳"+"\n");
        osw.write("我就是月亮"+"\n");
        System.out.println("书写完毕！");
        osw.close();
    }
}
